/*
 * Copyright (c) 2012 swing-on-fire Team
 * 
 * This file is part of Swing-On-Fire (http://code.google.com/p/swing-on-fire), licensed under the terms of the MIT
 * License (MIT).
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
 * Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package com.google.code.swingonfire.showcase.interpolation;

import static com.google.code.swingonfire.utility.interpolation.Interpolations.*;

import com.google.code.swingonfire.utility.interpolation.Interpolation;
import com.google.code.swingonfire.utility.interpolation.LinearInterpolation;
import com.google.code.swingonfire.utility.interpolation.SoftInterpolation;

public enum InterpolationSamples
{
    NONE("none", null),
    LINEAR("linear()", new LinearInterpolation()),
    INVERSE_LINEAR("inverse(linear())", inverse(linear())),
    MIRROR_LINEAR("mirror(linear())", mirror(linear())),
    MULTIPLY_LINEAR("multiply(linear(), -2, 4)", multiply(linear(), -2, 4)),
    REPEAT_LINEAR("repeat(linear(), 3)", repeat(linear(), 3)),
    REVERSE_LINEAR("reverse(linear())", inverse(linear())),
    SOFT("soft()", new SoftInterpolation()),
    INVERSE_SOFT("inverse(soft())", inverse(soft())),
    MIRROR_SOFT("mirror(soft())", mirror(soft())),
    MULTIPLY_SOFT("multiply(soft(), -2, 4)", multiply(soft(), -2, 4)),
    REPEAT_SOFT("repeat(soft(), 3)", repeat(soft(), 3)),
    REVERSE_SOFT("reverse(soft())", inverse(soft())),
    ACCURATE("accurate()", accurate()),
    INVERSE_ACCURATE("inverse(accurate())", inverse(accurate())),
    MIRROR_ACCURATE("mirror(accurate())", mirror(accurate())),
    MULTIPLY_ACCURATE("multiply(accurate(), -2, 4)", multiply(accurate(), -2, 4)),
    REPEAT_ACCURATE("repeat(accurate(), 3)", repeat(accurate(), 3)),
    REVERSE_ACCURATE("reverse(accurate())", reverse(accurate())),
    DOUBTFUL("doubtful()", doubtful()),
    INVERSE_DOUBTFUL("inverse(doubtful())", inverse(doubtful())),
    MIRROR_DOUBTFUL("mirror(doubtful())", mirror(doubtful())),
    MULTIPLY_DOUBTFUL("multiply(doubtful(), -2, 4)", multiply(doubtful(), -2, 4)),
    REPEAT_DOUBTFUL("repeat(doubtful(), 3)", repeat(doubtful(), 3)),
    REVERSE_DOUBTFUL("reverse(doubtful())", reverse(doubtful())),
    ACCELERATING("accelerating()", accelerating()),
    INVERSE_ACCELERATING("inverse(accelerating())", inverse(accelerating())),
    MIRROR_ACCELERATING("mirror(accelerating())", mirror(accelerating())),
    MULTIPLY_ACCELERATING("multiply(accelerating(), -2, 4)", multiply(accelerating(), -2, 4)),
    REPEAT_ACCELERATING("repeat(accelerating(), 3)", repeat(accelerating(), 3)),
    REVERSE_ACCELERATING("reverse(accelerating())", reverse(accelerating())),
    SLOWING("slowing()", slowing()),
    INVERSE_SLOWING("inverse(slowing())", inverse(slowing())),
    MIRROR_SLOWING("mirror(slowing())", mirror(slowing())),
    MULTIPLY_SLOWING("multiply(slowing(), -2, 4)", multiply(slowing(), -2, 4)),
    REPEAT_SLOWING("repeat(slowing(), 3)", repeat(slowing(), 3)),
    REVERSE_SLOWING("reverse(slowing())", reverse(slowing())),
    SEQUENTIAL("sequential().add(inverse(soft())).add(0.375, fix(0)).add(0.625, soft())", sequential()
        .add(inverse(soft())).add(0.375, fix(0)).add(0.625, soft())),
    SHAKE_1("shake(1)", shake(1)),
    SHAKE_2("shake(2)", shake(2)),
    SHAKE_4("shake(4)", shake(4)),
    SHAKE_8("shake(8)", shake(8)),
    SHAKE_16("shake(16)", shake(16)),
    SHAKE_32("shake(32)", shake(32)),
    TOON("toon()", toon());

    private final String description;
    private final Interpolation interpolation;

    private InterpolationSamples(String description, Interpolation transition)
    {
        this.description = description;
        interpolation = transition;
    }

    public Interpolation getInterpolation()
    {
        return interpolation;
    }

    @Override
    public String toString()
    {
        return description;
    }
}
